package com.sanqi.work.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.sanqi.common.annotation.Excel;
import com.sanqi.common.annotation.SanqiSimpleExcel;

import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sanqi.common.core.domain.BaseEntity;

/**
 * 员工对象 work_user
 * 
 * @author duany
 * @date 2025-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("work_user")
public class WorkUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /** 员工姓名 */
    @Excel(name = "员工姓名")
    @TableField(value="user_real_name")
    @SanqiSimpleExcel(title = "姓名")
    private String userRealName;

    /** 班组ID */
    @Excel(name = "班组ID")
    @TableField(value="team_id")
    private String teamId;

    /** 职场ID */
    @Excel(name = "职场ID")
    @TableField(value="workplace")
    private String workplace;
    
    /** 职位 */
    @Excel(name = "职位")
    @TableField(value="user_position")
    @SanqiSimpleExcel(title = "职位")
    private String userPosition;
    
    /** 入职日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入职日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value="hire_date")
    @SanqiSimpleExcel(title = "入职时间", dateFormat = "yyyy-MM-dd")
    private Date hireDate;

    /** 离职日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "离职日期", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value="effective_date")
    @SanqiSimpleExcel(title = "离职时间", dateFormat = "yyyy-MM-dd")
    private Date effectiveDate;

    /** sysOrgCode */
    @Excel(name = "sysOrgCode")
    @TableField(value="sys_org_code")
    private String sysOrgCode;
    
    /** 身份证号码 */
    @Excel(name = "身份证号码")
    @TableField(value="id_no")
    @SanqiSimpleExcel(title = "身份证号码")
    private String idNo;
    /** 状态 2离职 1在职 */
    @Excel(name = "状态")
    @TableField(value="user_status")
    private String userStatus;
    /** 联系电话 */
    @Excel(name = "联系电话")
    @TableField(value="phone_number")
    @SanqiSimpleExcel(title = "联系电话")
    private String phoneNumber;
    /** 性别 */
    @Excel(name = "性别")
    @TableField(value="user_sex")
    @SanqiSimpleExcel(title = "性别")
    private String userSex;
    
    /** OP账号 */
    @TableField(exist = false)
    private String userOpCode;

    /** 会员账号 */
    @TableField(exist = false)
    private String userAccount;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userRealName", getUserRealName())
            .append("teamId", getTeamId())
            .append("workplace", getWorkplace())
            .append("hireDate", getHireDate())
            .append("effectiveDate", getEffectiveDate())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("sysOrgCode", getSysOrgCode())
            .append("idNo", getIdNo())
            .append("phoneNumber", getPhoneNumber())
            .toString();
    }
}
